import 'package:flutter/material.dart';

import 'hz_dialog_action.dart';
typedef  HZVoidCallback = void Function();
class HZDialogActionItem extends StatelessWidget {
  ///
  /// Typically a [HZDialogAction] widget.
  ///
  final HZDialogAction action;
  final HZVoidCallback onTap;
  final bool showVerticalDivider;

  const HZDialogActionItem(
      {Key? key, required this.action, required this.onTap, this.showVerticalDivider = true})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return InkWell(
      onTap: onTap,
      child: Container(
        height: 45,
        decoration: showVerticalDivider
            ? BoxDecoration(
            border: Border(
                right: BorderSide(color: Color(0xFFE2E2E2), width: 0.5)))
            : null,
        alignment: Alignment.center,
        child: DefaultTextStyle(
          style: TextStyle(fontSize: 16, color: Color(0xFF333333)),
          child: action.title,
        ),
      ),
    );
  }
}